using System;
using System.Collections.Generic;
using System.Text;
using Gestion.Core.Service.Generic;
using Gestion.Core.Data.Generic;

namespace Gestion.Service.Business.Generic
{
    public class GenericReadOnlyBusinessService<T, ID, DAO> : IGenericReadOnlyBusinessService<T, ID>
        where DAO : IGenericReadOnlyDao<T, ID>
    {        

        private DAO _dao = default(DAO);
        protected DAO Dao
        {
            get { return _dao; }
            set { _dao = value; }
        }
        public T GetById(ID id)
        {
            return Dao.GetById(id);
        }

        public int CountAll()
        {
            return Dao.CountAll();
        }

        public IList<T> FindAll()
        {
            return Dao.FindAll();
        }       

    }
}
